Skip to content

fix(desktop): set MakerDeb/MakerRpm bin to lightfast#652

Merged
jeevanpillay merged 1 commit intomainfrom
feat/desktop-linux-bin-option
May 7, 2026
Merged

fix(desktop): set MakerDeb/MakerRpm bin to lightfast#652
jeevanpillay merged 1 commit intomainfrom
feat/desktop-linux-bin-option

Conversation

@jeevanpillay
Copy link
Copy Markdown
Member

@jeevanpillay jeevanpillay commented May 6, 2026

Summary

Surfaced by the @lightfast/desktop@0.1.0-rc.5 dry-run after PR #650 merged: both Build Linux x64 and Build Linux arm64 legs failed identically at the maker step:

could not find the Electron app binary at .../Lightfast-linux-x64/@lightfast/desktop

Root cause

electron-installer-common's getDefaultsFromPackageJSON defaults options.bin to pkg.name. After the release workflow runs npm version, that field is @lightfast/desktop (the npm package name) — not the executable name. The actual binary on disk is lightfast, set via packagerConfig.executableName in forge.config.ts:114. The makers don't read executableName — they have their own bin option which I didn't set in PR #650.

MakerRpm shares the same default via electron-installer-redhat, so both makers fail the same way.

Fix

Set options.bin: "lightfast" on both MakerDeb and MakerRpm (one line each + a comment explaining the override). No other changes.

Why local builds missed this

pnpm make --platform=darwin --arch=arm64 (the Phase 1 verification) only exercises mac makers. Local Linux make wasn't in the verification path; the rc dry-run was the integration test for "Linux release path produces installable artifacts" — pattern from feedback_release_pipeline_dryrun.md (rc.1 → rc.4 surfaced 7 bugs invisible to local builds; this is bug #1 of the rc.5 round).

Test plan

  • pnpm --filter @lightfast/desktop typecheck passes locally
  • Desktop CI matrix (macos-14 + ubuntu-22.04) goes green on this PR
  • After merge, push @lightfast/desktop@0.1.0-rc.6 and confirm:

Notes for reviewer

The mac legs in rc.5 succeeded — confirms PR #650's buildbuild_macos rename and the .dmg attestation extension don't regress. The only failure was the Linux maker bin default, which this PR fixes.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected binary naming in Linux package distributions (DEB and RPM) to ensure consistent executable naming across all platforms.

The Linux makers default `options.bin` to `pkg.name` (via
electron-installer-common's getDefaultsFromPackageJSON). After the release
workflow runs `npm version`, that value is `@lightfast/desktop` — the
package's npm name, not the executable name. The actual binary on disk is
`lightfast`, set via `packagerConfig.executableName`.

Without an explicit override, both makers fail at the binary-symlink step:

  could not find the Electron app binary at
  ".../Lightfast-linux-x64/@lightfast/desktop"

Set `options.bin: "lightfast"` on both MakerDeb and MakerRpm. Surfaced by
the @lightfast/desktop@0.1.0-rc.5 dry-run; mac legs were unaffected.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
lightfast-app Skipped Skipped May 6, 2026 0:49am
lightfast-platform Skipped Skipped May 6, 2026 0:49am
lightfast-www Skipped Skipped May 6, 2026 0:49am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

📝 Walkthrough

Walkthrough

Explicit bin: "lightfast" property added to MakerDeb and MakerRpm options in the Electron Forge configuration to ensure Linux DEB and RPM packages produce binaries with the correct name, overriding framework defaults.

Changes

Linux Binary Packaging

Layer / File(s) Summary
Packaging Configuration
apps/desktop/forge.config.ts
MakerDeb and MakerRpm now explicitly set bin: "lightfast" to align produced binary names with the app's configured executable, overriding framework-derived defaults.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • lightfastai/lightfast#650: Originally introduced MakerDeb and MakerRpm configuration; this PR adds missing explicit bin overrides to those same makers.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title follows conventional commits format with 'fix:' prefix, is under 70 characters (52 chars), and accurately describes the main change of setting binary names for Linux packaging makers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/desktop-linux-bin-option
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/desktop-linux-bin-option

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
apps/desktop/forge.config.ts (1)

164-164: ⚡ Quick win

[warning] Single-source the executable name to avoid future drift.

"lightfast" is now repeated across packager and makers (Line 116, Line 164, Line 181). Extract a constant so future renames don’t silently reintroduce this class of release break.

Proposed diff
+const EXECUTABLE_NAME = "lightfast";
+
 const config: ForgeConfig = {
   packagerConfig: {
     name: "Lightfast",
-    executableName: "lightfast",
+    executableName: EXECUTABLE_NAME,
@@
           // .../Lightfast-linux-<arch>/@lightfast/desktop".
-          bin: "lightfast",
+          bin: EXECUTABLE_NAME,
@@
           // shares the same `getDefaultsFromPackageJSON` helper.
-          bin: "lightfast",
+          bin: EXECUTABLE_NAME,

Also applies to: 181-181

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/desktop/forge.config.ts` at line 164, The executable name "lightfast" is
hardcoded in multiple places (e.g., the bin field and packager/makers) which can
drift; introduce a single constant (e.g., APP_NAME or EXECUTABLE_NAME) at the
top of this module and replace all literal occurrences (the bin: "lightfast"
entry and the repeated names referenced around the packager and makers blocks)
with that constant so renames only require one change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/desktop/forge.config.ts`:
- Line 164: The executable name "lightfast" is hardcoded in multiple places
(e.g., the bin field and packager/makers) which can drift; introduce a single
constant (e.g., APP_NAME or EXECUTABLE_NAME) at the top of this module and
replace all literal occurrences (the bin: "lightfast" entry and the repeated
names referenced around the packager and makers blocks) with that constant so
renames only require one change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 539332c0-59ae-4a76-9b5e-72f4a4d86e58

📥 Commits

Reviewing files that changed from the base of the PR and between 68ddca4 and 4c229ba.

📒 Files selected for processing (1)
  • apps/desktop/forge.config.ts

@jeevanpillay jeevanpillay merged commit 3df9019 into main May 7, 2026
16 checks passed
@jeevanpillay jeevanpillay deleted the feat/desktop-linux-bin-option branch May 7, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant